package thread;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:DELL
 * Date:2025-02-10
 * Time:23:48
 */
class Singletonlazy{
    private static volatile Singletonlazy instance=null;
    public static Singletonlazy getInstance(){
        if(instance==null) {
            synchronized (Singletonlazy.class) {
                if (instance == null) {
                    instance = new Singletonlazy();
                }
            }
        }
        return instance;
    }
    private Singletonlazy(){

    }
}
public class Demo2 {
    public static void main(String[] args) {

    }
}
